package study.javaee.practice.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.lang.Nullable;
import org.springframework.security.core.userdetails.UserDetailsService;
import study.javaee.practice.entity.User;

public interface UserService extends UserDetailsService {
    @Nullable
    User getCurrentUser();
    User getCurrentUser(boolean refreshSecurityUser);
    User getUserById(Integer id);
    User getUserByEmail(String email);
    void addUser(User user);
    boolean hasUser(String email);
    boolean hasUser(Integer userId);
    IPage<User> getUsers(User user, long page, long pageSize);
    void updateUserById(User user, int id);
    void updateCurrentUser(User user);
}
